package com.shaozj.datasource.dynamic;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.springframework.core.annotation.Order;

/**
 * 动态数据源切面拦截
 */
//@Aspect
//@Component
@Order(1)  //请注意这里order一定要小于tx:annotation-driven的order，即先执行 DynamicDataSourceAspect 切面，再执行事务切面，才能获得最终数据源
public class DynamicDataSourceAspect {


    @Around("execution(* com.shaozj.*.controller.*.*(..))")
    public Object doAround(ProceedingJoinPoint jp) throws Throwable {
//        ServletRequestAttributes sra = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
        Object result = null;

        return null;
    }
}
